package com.wangzhixuan.apiController;







import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wangzhixuan.commons.base.ApiBaseController;
import com.wangzhixuan.commons.constant.ApiCode;
import com.wangzhixuan.model.BaseInfo;
import com.wangzhixuan.model.vo.BaseInfoVo;
import com.wangzhixuan.service.IBaseInfoService;
import com.wangzhixuan.service.ICategoryService;
import com.wangzhixuan.service.IPeopleWorkService;
import com.wangzhixuan.service.IUserService;


/**
 * @description：
 * @author：zhixuan.wang
 * @date：2015/10/1 14:51
 */
//@CrossOrigin(origins = "*")当前版本1.7 会报错，原因版本太低 http://spring.io/guides/gs/rest-service-cors/
@Controller
@RequestMapping("/api")
public class JobBriefApiController extends ApiBaseController{

    @Autowired
    private IUserService userService;
    
    @Autowired 
    private IBaseInfoService baseInfoService;
    
    @Autowired 
    private IPeopleWorkService peopleWorkService;
    
    @Autowired
    private ICategoryService categoryService;
	
	@RequestMapping("/job/brief")
    @ResponseBody
    public Object Brief(){
		List<Map<String,Object>> list = categoryService.selectCate();
		return renderSuccess(ApiCode.CODE_200, "成功",list);
    }
	
	@RequestMapping("/jobbrief/list")
    @ResponseBody
    public Object groupList(String jobCategory) {
		List<Map<String,Object>> list = baseInfoService.selecListtByJobCategory(jobCategory);
		return renderSuccess(ApiCode.CODE_200, "成功",list);
    }
	
	
}
